<?php
include_once('cont/cont.user.php');

	if(!isset($_SESSION['login'])){
		session_start();
	}
	if(isset($_SESSION['login'])){
		if(isset($_SESSION['login']) && $_SESSION['roles']==1){
		 header('location:_admin.php');
		}
		if(isset($_SESSION['login']) && $_SESSION['roles']==2){
		 header('location:_bph.php');
		}
		if(isset($_SESSION['login']) && $_SESSION['roles']==3){
		 header('location:_stapala.php');
		}
	}
?>

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="shortcut icon" href="../../assets/ico/favicon.ico">

    <title>Database STAPALA</title>
    <link href="view/bt/css/bootstrap.min.css" rel="stylesheet">
    <link href="view/bt/css/sticky-footer-navbar.css" rel="stylesheet">
  </head>

  <body>

    <!-- Fixed navbar -->
    <div class="navbar navbar-default navbar-fixed-top" role="navigation">
      <div class="container">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" href="#">STAPALA</a>
        </div>
      </div>
    </div>

    
     <div class="container">
	 
	 <div class="page-header">
        <h1>Aplikasi Database STAPALA</h1>
      </div>
	  
		<div class="col-md-6">
		</div>
		<div class="col-md-6">		
		  <form class="form-signin" role="form">
			<h2 class="form-signin-heading">Silakan Login</h2>
			<input name="spa" id="spa" type="text" class="form-control" placeholder="Masukan SPA anda" required autofocus>
			<input name="password" id="password" type="password" class="form-control" placeholder="Masukan Password Anda" required>
			<label class="checkbox">
			  <input type="checkbox" value="remember-me"> Remember me
			</label>
			<button class="btn btn-lg btn-primary btn-block" type="submit" name="login">Login</button>
		  </form>
		</div>
		</div>

    <div id="footer">
      <div class="container">
        <p class="text-muted">&copy; Gerhantara 2014</p>
      </div>
    </div>
	
    <script src="view/bt/js/jquery.min.js"></script>
    <script src="view/bt/js/bootstrap.min.js"></script>
  </body>
</html>